package org.jeecg.modules.activities.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.activities.entity.FhChallenroll;
import org.jeecg.modules.activities.mapper.FhChallenrollMapper;
import org.jeecg.modules.activities.service.IFhChallenrollService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 挑战报名
 * @Author: jeecg-boot
 * @Date:   2024-07-16
 * @Version: V1.0
 */
@Service
public class FhChallenrollServiceImpl extends ServiceImpl<FhChallenrollMapper, FhChallenroll> implements IFhChallenrollService {

    @Autowired
    private FhChallenrollMapper fhChallenrollMapper;

    /**
     * 通过userId查询数据
     *
     * @param userId 主表id
     * @return List<FhChallenroll>
     */
    @Override
    public List<FhChallenroll> selectByUser(String userId){
        return fhChallenrollMapper.selectByUser(userId);
    }

    @Override
    public List<FhChallenroll> selectjhPage(@Param("userId") String userId,Page<FhChallenroll> page, Wrapper<FhChallenroll> wrapper){
        return fhChallenrollMapper.queryListByUser(userId,page,wrapper);
    }
}
